import Vue from 'vue';
import {SET_TOKEN} from "../types/user";

export default {
    namespaced: true,
    state: {
        token: Vue.ls.get("token", {})
    },
    mutations: {
        [SET_TOKEN](state, data) {
            state.token = data
        }
    },
    actions: {
        [SET_TOKEN]({commit}, data) {
            commit(SET_TOKEN, data)
        }
    }
}